<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>记住密码</title>
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <link rel="stylesheet" href="../layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../css/shortrent.shortrent.css">
    <script type="application/javascript" src="../js/jquery-3.3.1.js"></script>
    <script type="application/javascript" src="../js/bootstrap.min.js"></script>
    <script type="application/javascript" src="../layui/layui.js"></script>
    <script type="application/javascript" src="../js/vue.min.js"></script>
</head>
<script>
    function look() {
        var ema = document.getElementById("email").value;
        $.ajax({
            type:"post",
            url:"/user/back?email="+ema,
            dataType:"json",
            success:function(data){
                    alert(data.code);

            }
        });
    }
</script>
<script>
    function checkmail() {
        $.ajax({
            type:"post",
            data:$("form").serialize(),
            url:"/user/findUserEmailone",
            dataType:"json",
            success:function(data){
                alert();
                //window.location.href=("check.html");
                if (data.statusCode == 200){
                    window.location.href="/update?id="+data.data;
                }
            },
            error: function() {
                alert("ajax错误");
            }
        });
    }
</script>
<body>
<form action="" method="post">
    <div id="ema">请输入邮箱：<input type="text" id="email" name="email"></div><br>
    <div >
        <!--<button  onclick="look()">去验证</button>-->
        <a onclick="look()" href="javascript:void(0)">去验证</a>
    </div>
    <!--<button class="layui-btn layui-btn-xs " @click="yanzheng(email)">验证</button>-->

    <div id="uu">验证码：<input type="text" id="uuid" name="uuid"></div><br>
    <input type="submit" value="提交" onclick="checkmail()">
    </form>
</body>
</html>